<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>增减资金</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  
    {include file="public/css"}
    {include file="public/js"}
</head>
<body>
<blockquote class="layui-elem-quote">增减资金</blockquote>
<div class=""  style="padding:20px">


<form class="layui-form" action="" method="post" >

              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"><span class="red">*</span> 会员名</label>
                <div class="layui-input-inline">
                  <input type="text" name="username" required  lay-verify="required" placeholder="" autocomplete="off" class="layui-input" value="{$Request.param.username}">
                </div>
              </div>
              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"><span class="red">*</span> 资金类型</label>
                <div class="layui-input-inline">
                    <input type="radio" name="type" value="0" title="收入" checked>
                   <input type="radio" name="type" value="1" title="支出" >
                </div>
              </div> 
              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"><span class="red">*</span> 金额</label>
                <div class="layui-input-inline" style="width:110px;">
                  <input type="text" name="amount" lay-verify="amount" autocomplete="off" placeholder="" class="layui-input" maxlength="11">
                </div>
     
               <div class="layui-form-mid layui-word-aux">元 </div>
              </div>

             <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"> <span class="red">*</span>支付方式</label>
                <div class="layui-input-inline">
               <select name="bankname" lay-verify="required">
                      <option value="现金">现金</option>
                      <option value="支付宝">支付宝</option>
                      <option value="微信支付">微信支付</option>
                      <option value="贝宝">贝宝</option>
                      <option value="支付宝">支付宝</option>
                      <option value="财付通">财付通</option>
                      <option value="招商银行">招商银行</option>
                      <option value="中国工商银行">中国工商银行</option>
                      <option value="中国农业银行">中国农业银行</option>
                      <option value="中国建设银行">中国建设银行</option>
                      <option value="中国交通银行">中国交通银行</option>
                      <option value="中国银行">中国银行</option>
                      <option value="邮政储蓄">邮政储蓄</option>
                      <option value="邮政汇款">邮政汇款</option>
                      <option value="其他">其他</option>
                </select>
                </div>
              </div>

             <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"><span class="red">*</span> 备注</label>
                <div class="layui-input-inline">
                 <textarea name="remark" placeholder="" class="layui-textarea">余额充值</textarea>
            
                </div>
              </div>


              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"></label>
                <div class="layui-input-inline">
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="form">确 定</button>
                </div>
              </div>
</form>
</div>

<script>
// 默认必须存在的
layui.use(['element', 'layer','form'], function(){
   var  element = layui.element, layer = layui.layer,form = layui.form;
 //监听提交
  form.on('submit(form)', function(data){
    $.post("{:url('user/money')}",$("form").serialize(),function(json){
          if(json.code == 0){
           
            layer.msg(json.msg);
            setTimeout(function(){
              location.reload();
            },1000);
          
          }else{
            layer.msg(json.msg);
          }
    });
    return false; //阻止表单跳转
  });
});

</script>

</body>

</html>